SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE [dbo].[usp_ShowNotices]
    (
      @param_JOL_Bulletin_Type VARCHAR(50),
      @param_JOL_Bulletin_SubType VARCHAR(50)
    )
AS 
    SELECT  JOL_Bulletin_No,
            JOL_Bulletin_Title,
            JOL_Bulletin_UpdateTime,
            JOL_Bulletin_IsSetTop
    FROM    dbo.JOL_Bulletin
    WHERE   JOL_Bulletin_Type = @param_JOL_Bulletin_Type
            AND JOL_Bulletin_SubType = @param_JOL_Bulletin_SubType
    ORDER BY JOL_Bulletin_IsSetTop DESC,          
            JOL_Bulletin_UpdateTime DESC,
            JOL_Bulletin_AddTime DESC

GO
